import request from '@/utils/request'

export function getCode(data) {
  return request({
    url: '/cloudcut-api/userLogin/sms',
    method: 'post',
    data
  })
}
export function forgetPass(data) {
  return request({
    url: '/cloudcut-api/userLogin/forgetPassword',
    method: 'post',
    data
  })
}
export function loginByCode(data) {
  return request({
    url: '/cloudcut-api/userLogin/phoneLogin',
    method: 'post',
    data
  })
}
export function loginByPass(data) {
  return request({
    url: '/cloudcut-api/userLogin/login',
    method: 'post',
    data
  })
}
export function login(data) {
  return request({
    url: '/vue-admin-template/user/login',
    method: 'post',
    data
  })
}
export function updatePassword(data) {
  return request({
    url: '/cloudcut-api/userinfo/modifyPassword',
    method: 'post',
    data
  })
}
export function register(data) {
  return request({
    url: '/cloudcut-api/userLogin/register',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/cloudcut-api/userinfo/profile',
    method: 'post'
  })
}
export function addFeedback(data) {
  return request({
    url: '/cloudcut-api/userinfo/feedbackAdd',
    method: 'post',
    data
  })
}

export function updateUserInfo(data = {}) {
  return request({
    url: '/cloudcut-api/userinfo/modify',
    method: 'post',
    data
  })
}
export function authById(data = {}) {
  return request({
    url: '/cloudcut-api/userinfo/identification',
    method: 'post',
    data
  })
}
export function authByCorp(data = {}) {
  return request({
    url: '/cloudcut-api/userinfo/identificationCompany',
    method: 'post',
    data
  })
}
export function getProvience() {
  return request({
    url: '/cloudcut-api/area-api/province',
    method: 'get'
  })
}
export function getCity(params = {}) {
  return request({
    url: '/cloudcut-api/area-api/city',
    method: 'get',
    params
  })
}
export function getLoginBanner() {
  return request({
    url: '/cloudcut-api/banner-api/list',
    method: 'get',
    params: {
      bannerType: 1
    }
  })
}
